package com.taxi.controller;


import com.taxi.dto.DriverCarBindingRelationship;
import com.taxi.result.Result;
import com.taxi.service.IDriverCarBindingRelationshipService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import org.springframework.stereotype.Controller;

/**
 *
 * @author aniu
 * @since 2023-09-28
 */
@RestController
public class DriverCarBindingRelationshipController {
    @Autowired
    private IDriverCarBindingRelationshipService driverCarBindingRelationshipService;

    /**
     * 司机绑定状态
     * @param driverCarBindingRelationship
     * @return
     */
    @ApiOperation("司机绑定状态")
    @PostMapping("/bind")
    public Result bind(@RequestBody DriverCarBindingRelationship driverCarBindingRelationship){
        return driverCarBindingRelationshipService.bind(driverCarBindingRelationship);
    }

    @ApiOperation("司机解绑")
    @PostMapping("/unbind")
    public Result unbind(@RequestBody DriverCarBindingRelationship driverCarBindingRelationship){
        return driverCarBindingRelationshipService.unbind(driverCarBindingRelationship);
    }
}
